import 'package:factoryside/bean/order_record_entity.dart';

orderRecordEntityFromJson(OrderRecordEntity data, Map<String, dynamic> json) {
	if (json['Content'] != null) {
		data.content = json['Content'].toString();
	}
	if (json['CreateDate'] != null) {
		data.createDate = json['CreateDate'].toString();
	}
	if (json['UserName'] != null) {
		data.userName = json['UserName'].toString();
	}
	if (json['LeavemessageimgList'] != null) {
		data.leavemessageimgList = new List<OrderRecordLeavemessageimgList>();
		(json['LeavemessageimgList'] as List).forEach((v) {
			data.leavemessageimgList.add(new OrderRecordLeavemessageimgList().fromJson(v));
		});
	}
	return data;
}

Map<String, dynamic> orderRecordEntityToJson(OrderRecordEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Content'] = entity.content;
	data['CreateDate'] = entity.createDate;
	data['UserName'] = entity.userName;
	if (entity.leavemessageimgList != null) {
		data['LeavemessageimgList'] =  entity.leavemessageimgList.map((v) => v.toJson()).toList();
	}
	return data;
}

orderRecordLeavemessageimgListFromJson(OrderRecordLeavemessageimgList data, Map<String, dynamic> json) {
	if (json['Url'] != null) {
		data.url = json['Url'].toString();
	}
	return data;
}

Map<String, dynamic> orderRecordLeavemessageimgListToJson(OrderRecordLeavemessageimgList entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Url'] = entity.url;
	return data;
}